#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <config.h>
#include <QPainter>
#include <QTimer>
#include <QIcon>
#include <QPixmap>
#include <map_1.h>
#include <map_2.h>
#include <QPushButton>
#include <QApplication>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    //主菜单界面
    QPixmap m_menu;
    int m_menu_x=0;
    int m_menu_y=0;

    //按钮
    QPushButton *gamestart_btn = new QPushButton("启动游戏");
    QPushButton *gamequit_btn = new QPushButton("结束游戏");

    //时间
    long long time_counter=0;

    //地图
    Map1 map1;



public:
    //初始化主场景
    void MainScene();
    //更新游戏

    //绘制到屏幕
    void paintEvent(QPaintEvent *);
public slots:
    //槽函数
    void game_exit();
    void game_start();
    void updategame();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
